package com.jiangyg.mall.member.service;

import com.jiangyg.mall.core.support.restful.Pagination;
import com.jiangyg.mall.member.dto.MemberReceiveAddressDTO;
import com.jiangyg.mall.member.vo.MemberReceiveAddressVO;

import java.util.List;

/**
 * 类描述：会员收货地址
 *
 * @author jiangyg
 * @email email@jiangyg.com
 * @date 2021-10-18 22:00:56
 */
public interface MemberReceiveAddressService {

    /**
     * 功能描述：会员收货地址分页查询
     *
     * @param pagination 分页参数
     * @return 返回分页信息
     */
    Pagination<MemberReceiveAddressVO> selectPagination(Pagination<MemberReceiveAddressVO> pagination) throws Exception;

    /**
     * 功能描述：保存或者修改会员收货地址
     *
     * @param dto      会员收货地址
     * @param memberId 登录会员ID
     * @return 返回操作之后的数据
     */
    MemberReceiveAddressVO saveOrUpdate(MemberReceiveAddressDTO dto, Long memberId) throws Exception;

    /**
     * 功能描述：根据ID获取MemberReceiveAddress
     *
     * @param receiveAddressId 会员收货地址ID
     * @param memberId               登录会员ID
     * @return 返回会员收货地址
     */
    MemberReceiveAddressVO selectById(Long receiveAddressId, Long memberId) throws Exception;

    /**
     * 功能描述：批量删除MemberReceiveAddress
     *
     * @param receiveAddressIds 要删除的ID数组
     * @param memberId                登录会员ID
     * @return 返回是否操作成功
     */
    boolean delete(List<Long> receiveAddressIds, Long memberId);

    /**
     * 功能描述：根据会员ID查询收货地址列表
     *
     * @param memberId 会员ID
     * @return 收货地址列表
     */
    List<MemberReceiveAddressVO> selectListByMemberId(Long memberId) throws Exception;

}

